package org.tgcloud.group.repository;

import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.MjMediumOffline;
import org.tgcloud.group.web.controller.dto.medium.MediumAllProjectDTO;
import org.tgcloud.group.web.controller.dto.medium.MediumOfflineCountDTO;
import org.tgcloud.group.web.controller.dto.medium.MediumOfflineDTO;
import org.tgcloud.group.web.controller.dto.medium.MediumProjectMsgDTO;

import java.util.Date;
import java.util.List;

/**
 * @Author: zhy
 * @Created: 2025-09-10-下午4:24
 * @Description: ${description}
 */
public interface MjMediumOfflineMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MjMediumOffline record);

    int insertSelective(MjMediumOffline record);

    MjMediumOffline selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MjMediumOffline record);

    int updateByPrimaryKey(MjMediumOffline record);

    List<MediumOfflineDTO> selectManageList(@Param("keyword") String keyword, @Param("offlineType") Integer offlineType,
                                            @Param("status") Short status, @Param("excelShowTitleId") Integer excelShowTitleId,
                                            @Param("isBusiness") boolean isBusiness);

    int updateStatusById(@Param("id") int id, @Param("status") Short status);

    MediumOfflineDTO selectManageMsg(@Param("id") Integer lineId);

    List<MediumProjectMsgDTO> selectOfflineHasPackageProjectList(@Param("startTime") Date startDate, @Param("endTime") Date endDate,
                                                                 @Param("mediumId") Integer mediumId, @Param("projectId") Integer projectId,
                                                                 @Param("addIndex") Integer addIndex,
                                                                 @Param("chooseYihuoProjectIdList") String[] chooseYihuoProjectIdList,
                                                                 @Param("showChooseProjectType") Integer showChooseProjectType,
                                                                 @Param("chooseMediumOtherProjectIdList") String[] chooseMediumOtherProjectIdList,
                                                                 @Param("isBusiness") boolean isBusiness);

    List<MediumAllProjectDTO> selectAllOfflineListByProjectId(@Param("projectId") Integer projectId, @Param("addIndex") Integer addIndex,
                                                              @Param("chooseProjectId") Integer chooseProjectId,
                                                              @Param("chooseYihuoProjectIdList") String[] chooseYihuoProjectIdList,
                                                              @Param("showChooseProjectType") Integer showChooseProjectType,
                                                              @Param("chooseMediumOtherProjectIdList") String[] chooseMediumOtherProjectIdList,
                                                              @Param("mediumIdList") List<Integer> mediumIdList);

    List<MediumOfflineCountDTO> selectCountList();

    List<MjMediumOffline> selectAllListByCount();

    List<MediumProjectMsgDTO> selectOfflineAllProjectList(@Param("startTime") Date startDate, @Param("endTime") Date endDate);

    List<MjMediumOffline> selectCascader();

    List<Integer> selectIdListByMediaPartyId(@Param("mediaPartyId") Integer mediaPartyId);

    List<Integer> selectIdListByMediaPartyIds(@Param("mediaPartyIds") String[] mediaPartyIds);
}